GSS : Global Signal-Slot service

更新时间:
2024-05-14
下载文档

GSS : Global Signal-Slot service

Global Signal-Slot service is a daemon that performs multi-process SigSlot message forwarding for multi-process subscriptions and publishing communication.

If you use EdgerOS this service is automatically startup, if you use JSRE you need to use the following method to start this service:

$ gssd &

When the GSS process is initialized, it will leave the current process group and change itself into a daemon. The forwarding of message data is fully automated and does not require any configuration.

Permission

By default JSRE does not enable the apps to use GSS permissions, whether it is a Privileged Mode or a User Mode application.

To enable the application GSS service, you need to include the -g parameter when starting the application:

ParameterDescription
-g 0Disable GSS service. default.
-g 1Enable GSS service in listen-only mode.
-g 2Enable GSS service and allow receiving and publishing.

Example

$ javascript -g 1 hello.js

Zone

In order to filter unnecessary information, JSRE provides a zone option, and applications can choose different zones for interprocess communication.

Each application can only specify one zone to communicate at startup, and SigSlot messages between different zones are not forwarded.

The parameter zone is a string, default value is ''. The zone of the application can be specified by the startup parameter -z parameter.

Example

  • The apps started by the following methods can use SigSlot communication with each other.
$ javascript -g 2 app1.js
$ javascript -g 2 app2.js
$ javascript -g 2 -z test_zone_1 app1.js
$ javascript -g 2 -z test_zone_1 app2.js
  • The apps launched by the following methods cannot use SigSlot communication with each other.
$ javascript -g 2 -z test_zone_1 app1.js
$ javascript -g 2 -z test_zone_2 app2.js
$ javascript -g 2 app1.js
$ javascript -g 2 -z test_zone_2 app2.js

EdgerOS

EdgerOS uses GSS services for system message distribution.

文档内容是否对您有所帮助?
有帮助
没帮助